package health.lm.com.mine.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import health.lm.com.mine.R;
import health.lm.com.mine.entity.GrowthIntegralEntity;

/**
 * 成长中心
 * @author GQI
 */
public class GrowthIntegralAdapter extends BaseQuickAdapter<GrowthIntegralEntity.Menu,BaseViewHolder> {
    public GrowthIntegralAdapter(@Nullable List<GrowthIntegralEntity.Menu> data) {
        super(R.layout.item_growth_integral, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, GrowthIntegralEntity.Menu item) {
        helper.setText(R.id.tv_title,item.getTitle())
                .setText(R.id.tv_content,item.getContent())
                .setText(R.id.tv_todo,item.getStatus()?"去完成":"已完成")
                .setEnabled(R.id.tv_todo,item.getStatus());
    }
}
